#include<iostream>


class Base
{
    public:
    static int GetNum()
    {
        return a;
    }
    static void add()
    {
        a++;
    }
    protected:
        static int a;
};
int Base::a = 0;
class Derived : public Base
{
    public:
    static int GetNUm()
    {
        return a;
    }
};
int main()
{
    Derived d;
    Base::add();
    std::cout << d.GetNUm() << std::endl;
    return 0;
}